/****************************************************************************
**
** JournalGump.h
**
** Copyright (C) August 2014 Hotride
**
** This program is free software; you can redistribute it and/or modify
** it under the terms of the GNU General Public License as published by
** the Free Software Foundation; either version 2 of the License, or
** (at your option) any later version.
**
** This program is distributed in the hope that it will be useful,
** but WITHOUT ANY WARRANTY; without even the implied warranty of
** MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
** GNU General Public License for more details.
**
*****************************************************************************
*/
//---------------------------------------------------------------------------
#ifndef JournalGumpH
#define JournalGumpH
//---------------------------------------------------------------------------
class TJournalGump
{
private:
	DWORD LastChangedLineTime;

	short m_X;
	short m_Y;
	short m_MiniX;
	short m_MiniY;
	short m_Height;
	bool m_Minimized;
	short m_LastResizeY;
	
	bool m_ShowSystem;
	bool m_ShowObjects;
	bool m_ShowClient;

public:
	TJournalGump();
	~TJournalGump() {}

	void Init();
	void ChangeHeight();

	SETGET(short, X)
	SETGET(short, Y)
	SETGET(short, MiniX)
	SETGET(short, MiniY)
	SETGET(bool, Minimized)
	SETGET(bool, ShowSystem)
	SETGET(bool, ShowObjects)
	SETGET(bool, ShowClient)
	
	void SetHeight(short val);
	
	short GetHeight() const {return m_Height;}

	bool GetResizing() const {return (m_LastResizeY != 0);}
	
	int Draw(bool &mode, TGump *gump);

	void GenerateFrame(TGump *gump, float PosX, float PosY);

	void OnButtonUp(TGump *gump);
	bool OnLeftDoubleClick(TGump *gump);
	void OnMouseWheel(TGump *gump, MOUSE_WHEEL_STATE &state);
};
//---------------------------------------------------------------------------
#endif